//
//  BarberViewController.m
//  afn
//
//  Created by mac on 2018/5/8.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "BarberViewController.h"
#import "BarBerView.h"

@interface BarberViewController ()
@property(nonatomic,strong)BarBerView *aView;

@end

@implementation BarberViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title=@"发型师列表";
    _aView=[BarBerView new];
    [self.view addSubview:_aView];
    [_aView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
        make.top.mas_equalTo(NAV_HEIGHT);
    }];
    [_aView creatView];
    _aView.viewController=self;
    [self getBarber];
    
}
-(void)getBarber{
    NSDictionary *dic=[NSDictionary dictionaryWithObjectsAndKeys:_shop_id,@"shop_id",@"0",@"number", nil];
    [gongju AFNPOSTDataUrl:@"v1/barber/barber-list" andDic:dic andTableView:nil andViewController:self andSuccessBlock:^(id responseObject) {
        self->_aView.barerArr=responseObject ;
        [self->_aView.collectionView reloadData];
    } anderrorBlock:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
